/**
 * 
 * The MIT License
 * 
 * Copyright (c) 2008 the original author or authors.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package com.googlecode.gchartjava;

/**
 * Top level interface for all charts.
 *
 * @author Julien Chastang (julien.c.chastang at gmail dot com)
 */
public interface GChart{
		
	/**
	 * Set the chart size. If no size is specified it will default to 200x125.
	 * 
	 * @param x
	 *            Horizontal length.
	 * @param y
	 *            Vertical length.
	 */
	public void setSize(final int x, final int y);
	
	/**
	 * Create a URL string given the information supplied to this chart. You can
	 * copy and paste this string into your web browser, and see if you get the
	 * results you anticipated. Better yet, incorporate this method call or
	 * {@link #createURLForHTML()} into your Internet application to
	 * dynamically generate charts. URLs beyond 2000 characters are not
	 * recommended. You can sometimes get away with the simple encoding scheme if
	 * URL length is a problem. See {@link #setDataEncoding(DataEncoding dataEncoding)}
	 * 
	 * @return URL String
	 * 
	 * @see DataEncoding
	 * @see <a href="http://www.boutell.com/newfaq/misc/urllength.html">WWW
	 *      FAQs: What is the maximum length of a URL?</a>
	 */
	public String createURLString();
	
	/**
	 * Create a URL with the ampersand character entity reference &amp; in place of
	 * an ampersand. Useful for embedding your link in a web page.
	 * 
	 * @return URL string
	 */
	public String createURLForHTML();
			
	/**
	 * Specify background fill.
	 * 
	 * @param fill
	 *            Background fill.
	 * @see Fill
	 */
	public void setBackgroundFill(final Fill fill);
	
	/**
	 * Set the data encoding scheme. The only advantage to the simple encoding
	 * scheme is it will ultimately result in shorter URLs, but at the cost of
	 * lower resolution. gchartjava defaults to the extended encoding, but if you
	 * have lots of data and if you are willing to sacrifice resolution, the
	 * simple encoding may be right for you.
	 * 
	 * @param dataEncoding
	 *            Supply the data encoding, either simple or extended.
	 *            
	 * @see DataEncoding
	 */
	public void setDataEncoding(final DataEncoding dataEncoding);
}
